import 'package:flutter/material.dart';

class MyApp5 extends StatelessWidget {
  const MyApp5({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('Container组件'), backgroundColor: Colors.red),
      body: Center(
        child: Container(
          decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(20),
            border: Border.all(color: Colors.red, width: 5),
            color: Colors.blueGrey,
          ),
          padding: EdgeInsets.all(20),
          width: MediaQuery.of(context).size.width,
          height: MediaQuery.of(context).size.height / 2,
          alignment: Alignment.center,
          child: Container(
            margin: EdgeInsets.all(20),
            color: Colors.amber,
            width: MediaQuery.of(context).size.width,
            height: 200,
            child: Text('Container组件'),
          ),
        ),
      ),
    );
  }
}
